Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fix get_field for reserved names in field path #722

Closed
wants to merge 3 commits into from

Conversation

busunkim96
Copy link
Contributor

Texttospeech has a google.api.method_signature with the reserved name input. Append _ to field_paths in get_field so lookup succeeds.

  File "/usr/local/google/home/busunkim/.cache/bazel/_bazel_busunkim/d0728a13f0c84f7fc8315b82038f5e65/sandbox/linux-sandbox/1137/execroot/com_google_googleapis/bazel-out/host/bin/external/gapic_generator_python/gapic_plugin.runfiles/gapic_generator_python/gapic/schema/wrappers.py", line 819, in <genexpr>
    for name_and_field in filter_fields(sig)
  File "/usr/local/google/home/busunkim/.cache/bazel/_bazel_busunkim/d0728a13f0c84f7fc8315b82038f5e65/sandbox/linux-sandbox/1137/execroot/com_google_googleapis/bazel-out/host/bin/external/gapic_generator_python/gapic_plugin.runfiles/gapic_generator_python/gapic/schema/wrappers.py", line 807, in filter_fields
    field = self.input.get_field(*name.split('.'))
  File "/usr/local/google/home/busunkim/.cache/bazel/_bazel_busunkim/d0728a13f0c84f7fc8315b82038f5e65/sandbox/linux-sandbox/1137/execroot/com_google_googleapis/bazel-out/host/bin/external/gapic_generator_python/gapic_plugin.runfiles/gapic_generator_python/gapic/schema/wrappers.py", line 414, in get_field
    cursor = self.fields[field_path[0]]
KeyError: 'input'
--python_gapic_out: protoc-gen-python_gapic: Plugin failed with status code 1.
Target //google/cloud/texttospeech/v1beta1:texttospeech-v1beta1-py failed to build

https://github.com/googleapis/googleapis/blob/69697504d9eba1d064820c3085b4750767be6d08/google/cloud/texttospeech/v1beta1/cloud_tts.proto#L52

@busunkim96 busunkim96 requested a review from a team as a code owner December 28, 2020 16:28
@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Dec 28, 2020
@codecov
Copy link

codecov bot commented Dec 28, 2020

Codecov Report

Merging #722 (90d54ac) into master (f646767) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master      #722   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           26        26           
  Lines         1608      1609    +1     
  Branches       328       329    +1     
=========================================
+ Hits          1608      1609    +1     
Impacted Files Coverage Δ
gapic/schema/wrappers.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f646767...90d54ac. Read the comment docs.

@busunkim96
Copy link
Contributor Author

Closing this as I see @yon-mg addressed this in #716.

@busunkim96 busunkim96 closed this Dec 28, 2020
@busunkim96 busunkim96 deleted the fix-tts branch January 21, 2021 16:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant